/*
	关闭看门狗
	调用C实现的delay函数
*/

.global _start

_start:
	//disable watch dog
	ldr r0, =0xE2700000
	mov r1, #0x0
	str r1, [r0]

	//GPJ2_0/1/2/3 output function
	ldr r0, =0xE0200280
	ldr r1, =0x00001111
	str r1, [r0]

	mov r2, #0x1000
led_blink:
	ldr r0, =0xE0200284
	mov r1, #0
	str r1, [r0]

	mov r0, #0x100000
	bl delay

	ldr r0, =0xE0200284
	mov r1, #0xf
	str r1, [r0]

	mov r0, #0x100000
	bl delay

	sub r2,r2, #1
	cmp r2, #0
	bne led_blink

halt:
	b halt
